<table class="table table-bordered">
    <thead>
    <tr>
        <th>#</th>
        <th>Role</th>
        <th>Host</th>
        <th>Node</th>
        <th>Slot</th>
        <th>Options</th>
    </tr>
    </thead>
    <tbody>
    {{foreach from=$res.nodeList item=clusterNodes}}
    <tr class="master">
        <td>{{node_status_tag status=$clusterNodes.status index=$index}}</td>
        <td>{{$clusterNodes.role}} <span class="badge"> slave:{{if !empty($clusterNodes.slaveList) }}<span>{{$clusterNodes.slaveList.length}}</span>{{/if}}</span></td>
        <td>{{$clusterNodes.host}}</td>
        <td>{{$clusterNodes.nodeId}}</td>
        <td>
            {{$clusterNodes.slot}}{{slot_num slots=$clusterNodes.slot size=$res.clusterInfo.cluster_size index=$index}}
        </td>
        <td style="text-align:right">
            <button class="btn move-slave-confirm btn-info btn-xs option-button" data-nodeid="{{$clusterNodes.nodeId}}">To Master</button>
        </td>
    </tr>
    {{/foreach}}
    </tbody>
</table>